// Showing image at "/files/Image/'+pr+'/'+im+'" in window sized w/h
var win=0;

function showImage(im, t, w, h) {
	if (win && !win.closed) {
		win.close();
//		if (navigator.appName.indexOf("Opera") != -1) {
//			win.resizeTo(w,h);
//		} else {
//			win.innerWidth = w;
//			win.innerHeight = h;
//		}
} 
//	else
		win = window.open("", "photo", "width="+w+",height="+h);

	win.document.write('<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>'+t+'</title><style type="text/css">* {margin:0} img {border:none}</style></head><body><a href="#" title="Закрыть" onclick="window.close();return false;"><img src="'+im+'" /></a></body></html>');
	win.document.close();win.focus();
	return false;
}
